package whf.framework.web;

/**
 * 常量，专用于web环境，由于在jsp中有使用，所以这个类不能进行改名之类的重构
 * @author wanghaifeng
 *
 */
public interface Constants {
	//begin tabletag constants
	public final static String BO_CLASS_NAME="BO_CLASS_NAME"; //bo class name
	
	public final static String DATASOURCE_NAME = "DATASOURCE_NAME"; //定义数据源
	
	public final static String NAME_PREFIX = "NAME_PREFIX"; //定义名称前缀
	
	public final static String PK_SUFFIX = "PK_SUFFIX"; //使用主键作为后缀
	
	public final static String BOID_SUFFIX = "BOID";  //boid的后缀
	
	public final static String START = "START";
	
	public final static String END = "END";
	
	public final static String UID = "UID";
	
	public final static String ID = "id"; //对象Id
	//end tabletag constants
	
	public final static String QUERY_STRING = "QUERY_STRING";
	
	public final static String DYNAMIC_QUERY_STRING = "DYNAMIC_QUERY_STRING";
	
	public final static String DICT_CATEGORY = "DICT_CATEGORY";  //用在字典选择中，字典代码
	
	public final static String DICT_SYSTEM_TYPES = "SYS_TYPES";  //保留字典代码，系统类型；输出包括：int,String, double, float, 所有业务对象类型
	
	public final static String QUERY_ID = "QUERY_ID";
	
	public final static String META = "Meta";
	
	public final static String META_TYPE="MetaType";
	
	public final static String META_VIEW="VIEW";
	
	public final static String VALIDATE_ERRORS = "VALIDATE_ERRORS";
	
	public final static String VALIDATE_ERRORS_MSG_SUFFIX = "msg"; //tabletag中，消息span的名称后缀
	
	// default value
	public final static int DEFAULT_DISPLAY_WIDTH = 20;
	
	
	/**
	 * 需要修改的属性的名称；属性是Collection类型的，并在jsp中说明，使得在BaseStruts Action中可以获取；
	 */
	public final static String UPDATING_PROPERTY_NAME = "UPDATING_PROPERTY_NAME";
	
	public final static String 	UPDATING_PROPERTY_HOST = "UPDATING_PROPERTY_HOST";
	
	//Global Forward
	public final static String G_UPDATING_PROPERTY_NOT_FOUND_FORWARD = "global.property.notfound";
	
	public final static String G_EDIT_FORWARD = "global_edit";
	
	public final static String G_LIST_FORWARD = "global_list";
	
	public final static String G_VIEW_FORWARD = "global_view";
	
	public final static String G_SEARCH_FORWARD = "global_search";
	
	public final static String G_EDIT_PROPERTY_ELEMENT_FORWARD = "global_edit_property";
	
	//struts info
	public final static String STRUTS_META = "STRUTS-META"; //Struts中保存meta的key
	
	public final static String STRUTS_FORMNAME = "STRUTS-FORMNAME"; //同上，保存formName
	
	public final static String STRUTS_PATH = "STRUTS-PATH"; //同上，保存
	
	public final static String STRUTS_FORWARD = "STRUTS-FORWARD";

	public final static String STRUTS_PREFIX = "STRUTS-PREFIX";
	
	public final static String STRUTS_SUFFIX = "STRUTS-SUFFIX";
	
	public final static String STRUTS_NAVIGATION_PATH = "STRUTS_NAVIGATION_PATH";
	
	public final static String DUPLICATE_DEEPTH = "DEEPTH";
	/**
	 * 记住struts中最近调用的方法用作TableTag的导航url
	 * @property String:STRUTS_LASTEST_WEBMETHOD
	 */
	public final static String STRUTS_LASTEST_WEBMETHOD = "STRUTS_LASTEST_WEBMETHOD";
	//Session constants
	public final static String SESSION_LASTEST_META = "SESSION_LASTEST_META";
	
	public final static String SESSION_LASTEST_MENU = "SESSION_LASTEST_MENU";
	
	//页面中扩展属性的名称和数量
	public final static String REQUEST_KEEP_PARAMETER_PREFFIX = "_$_";

	public final static String REQUEST_KEEP_PARAMETERS = "_$_REQUEST_KEEP_PARAMETERS_$_";
	
	public final static String PAGE_MESSAGE_OBJECTS = "PAGE_MESSAGE_OBJECTS";
	//最近的使用的查询键值
	public final static String SESSION_LASTEST_QUERY_KEY = "SESSION_LASTEST_QUERY_KEY";
	
	/**
	 * 保存在pageContext or request中的目标类型，一般为当前的Meta中的bo class名称
	 * @property String:TARGET_FUNC_NAME
	 */
	public final static String FUNC_TARGET_TYPE = "FUNC_TARGET_TYPE";
	
	//Struts message
	public final static String MESSAGE_THEN_CLOSE = "MESSAGE_THEN_CLOSE";
	
	public final static String MESSAGE_ERROR = "MESSAGE_ERROR";
	
	/**
	 * 在Permission中绑定view或者其它的时候有view的时候，这个view的名字保存在
	 * request.getAttribute中，就是用这个名字；使得tabletag可以从request中
	 * 获取view
	 * @property String:AUTO_SETTER_VIEW
	 */
	public final static String AUTO_SETTER_VIEW = "AUTO_SETTER_VIEW";
	
	/**
	 * 查询表单扩充信息
	 */
	public final static String QUERY_FORM_TAG = "QUERY_FORM_TAG";
}
